//
//  Subject.h
//  SujetObserver
//
//  Created by Pierre DUCHENE on 05/01/10.
//  Copyright 2010 Pierre DUCHENE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ObserverProtocol.h"

/*!
    @protocol    SubjectProtocol
    @abstract    This interface declare the subject part of the Observer Pattern
*/
@protocol SubjectProtocol

@required

/*!
    @method     attach:
    @abstract   Add an observer to the subject
    @param      anObserver The new subject's observer
*/
- (void)attach:(id<ObserverProtocol>)anObserver;

/*!
    @method     detach:
    @abstract   Remove an observer from the subject
    @param      anObserver The observer to remove
*/
- (void)detach:(id<ObserverProtocol>)anObserver;

/*!
    @method     getAllObservers
    @abstract   Get all the subscribe observers
    @result     The Set of all observers
*/
- (NSSet*)getAllObservers;

@end
